﻿@model KnowledgeCommunity.Model.Commodity
@{
    ViewBag.Title = "Buy";
    Layout = "~/Views/Shared/_Layout_zone.cshtml";
}

<div class="contentcontainer">
    <div class="headings altheading">
        <h2>购买确认</h2>
    </div>
 @using (Html.BeginForm("Create", "Shop", FormMethod.Post, new { enctype = "multipart/form-data" }))
 {
     @Html.ValidationSummary(true)
     @Html.HiddenFor(model=>model.Id)
     @Html.HiddenFor(model=>model.ShapeCode)
    <div class="contentbox">
        <table width="100%">
            <thead>
                <tr>
                    <th>商品名称</th>
                    <th>发布者</th>
                    <th>发布时间</th>
                    <th>类别</th>
                    <th>状态</th>
                    <th>单价</th>
                    <th>购买数量</th>
                    <th>购买操作</th>
                </tr>
            </thead>
            <tbody>
                <tr class="alt">
                    <td>
                        @Model.Title
                    </td>
                    <td>
                        @Model.UserName
                    </td>
                    <td>
                        @Model.AddTime
                    </td>
                    <td>
                        @Enum.GetName(typeof(KnowledgeCommunity.Service.Enum.GoodType), Model.Sort)
                    </td>
                    <td>
                        @Enum.GetName(typeof(KnowledgeCommunity.Service.Enum.State), Model.State)
                    </td>
                    <td>
                        @Model.CurrentPrice
                    </td>
                    <td>
                       <input type="text" id="buyCount" value="1" />
                    </td>
                    <td>
                       <input type="submit" id="BuyIt" value="确认购买" />
                    </td>
                </tr>
            </tbody>
        </table>
        <div style="clear: both;"></div>
    </div>   
  }  
</div>
